package com.atguigu.springcloud.entities;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * 返回前端数据的包装类
 * @param <T>
 */
@Data   // 实体类 get set
@AllArgsConstructor // 所有参数
@NoArgsConstructor  // 空参
public class CommonResult<T> {
    private int code;
    private String message;
    private T      data;

    public CommonResult(int code, String message) {
        this(code, message, null);
    }

}
